I'm coding a simple program that uses strings. I have two choices
to define string like char string[1024] taht is to assume max size of string then ask user to enter his own string from keyboard and then gets(string);
But what if I use char *string; and then gets(string);
Is this method dangerous and is there a chance if user enter a long string to overwrite some memory and cause program to crash? I experimented with this in Turbo C and everything seems to work fine. But....?
If someone can answer this I would appreciated
Thanks